{% extends "../base_adminlte.html" %}
{% load custom_markdown %}
{% block content %}
<div class="content-wrapper">
  <section class="content-header">
    <h1>
      Ansible
      <small>任务列表</small>
    </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
      <li class="active">Ansible</li>
    </ol>
  </section>

  <section class="content">

      <table class="table table-bordered">
          <tr style="font-weight: bold; background-color: #3c8dbc80;">
            <td>ID</td>
            <td>AnsibleID</td>
            <!-- <td>CeleryID</td> -->
            <td>User</td>
            <!-- <td>GroupName</td> -->
            <td>任务</td>
            <td>参数</td>
           <!-- <td style="width:45px">结果</td> -->
            <td style="width:45px">状态</td>
            <td >时间</td>
            <!-- <td>Label</td> -->
          </tr>
        {% for t in object_list reversed %}
        <tr>
            <td>{{ t.id }}</td>
            <td><a href="{% url 'AnsibleTaskDetail' t.pk %}">{{ t.AnsibleID }}</a></td>
            <!-- <td>{{ t.CeleryID }}</td> -->
            <td>{{ t.TaskUser }}</td>
            <!-- <td>{{ t.GroupName }}</td> -->
            <td>{{ t.playbook }}</td>
            <td>{{ t.ExtraVars }}</td>
            <!-- <td><a href="/ansible/get_Ansible_Tasks/?dataKey={{t.AnsibleID}}">点击</a></td> -->
            <td>{{ t.CeleryResult|celery_status }}</td>
            <td>{{ t.CreateTime }} </td>
           <!-- <td>{{ t.Label }}</td> -->
        </tr>
        {% endfor %}
      </table>

  </section>
</div>
<style type="text/css">
  td {
    background-color: #dadbdb80;
  }
</style>
{% endblock %}
